use serde::Deserialize;

#[derive(Deserialize)]
pub struct GetPostsResponse(Vec<ApiPost>);

impl GetPostsResponse {
    pub fn posts(self) -> Vec<ApiPost> {
        return self.0;
    }
}

#[derive(Deserialize)]
pub struct ApiPost {
    pub content: String,
    pub account: ApiAccount,
}

#[derive(Deserialize)]
pub struct ApiAccount {
    pub acct: String,
    pub avatar_static: String, // url
}
